package com.sali.commons.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @description:
 * @author: sali
 * @date: 2025/3/2 下午1:09.
 * @version: 1.0
 */
public class CloseableUtil {

    private static final Logger logger = LoggerFactory.getLogger(CloseableUtil.class);

    public static void close(AutoCloseable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (Exception e) {
                logger.error("error close file, cause:", e);
            }
        }
    }

}
